import { ApiModelProperty } from "@nestjs/swagger"

class getQueryOption {
  @ApiModelProperty({
    description: `条件限制对象
  参考: where={}&skip=1&limit=1&sort={}
  `, example: {}, required: false,
  })
  where?: object
  @ApiModelProperty({ description: '跳过多少条数据', example: 10, required: false })
  skip?: number
  @ApiModelProperty({ description: '限制多少条数据 默认是 10', example: 10, required: false })
  limit?: number
  @ApiModelProperty({
    description: `排序条件 (默认id) 
    Sets the sort order
  * If an object is passed, values allowed are asc, desc, ascending, descending, 1, and -1.
  * If a string is passed, it must be a space delimited list of path names. The
  * sort order of each path is ascending unless the path name is prefixed with -
  * which will be treated as descending.`, example: '-_id', required: false
  })
  sort?: string | number
  @ApiModelProperty({ description: '当前页数 (不建议使用, 因为 skip 和 limit 足以确定当前页数)', example: 1, required: false })
  page?: number
}

export default getQueryOption